<template>
    <Modal v-model="show_notice" title="营销数据设置"
      :mask-closable="false"
      :ok-text="查看"
      :cancel-text='关闭'
      @on-ok='noticeOk'
      @on-cancel='noticeCancel'
      width="900"
      class="notice_modal">
      <p>{{content}}<p>
    </Modal>
</template>

<script>

import config from '@/config'
import { unFinshCashCount } from '../../api/index'
export default {
    data () {
        return {
            show_notice: false,
            content: ''
        }
    },
    methods:{
      noticeCancel() {
        this.$router.push({name: 'cash_out'})
      },
      noticeCancel() {
        this.show_notice = false
      },
      getCount() {
        unFinshCashCount().then(res => {
          if (res.code == 0) {
            _this.content = '您有'+res.count+'条待提现的记录，请点击查看'
          }
        })
      }
    },
    mounted() {
      let _this = this
      _this.getCount()
      setInterval(function () {
        _this.getCount()
      }, 600000)
  	}
}
</script>
<style lang="less" scoped>
  .notice_modal{
    /deep/ .ivu-modal{
      position: fixed;
      bottom:5px;
      right: 5px;
      top:auto
    }
  }
</style>
